import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/repair_order_entity.dart';

RepairOrderEntity $RepairOrderEntityFromJson(Map<String, dynamic> json) {
	final RepairOrderEntity repairOrderEntity = RepairOrderEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		repairOrderEntity.code = code;
	}
	final List<RepairOrderObj>? obj = jsonConvert.convertListNotNull<RepairOrderObj>(json['obj']);
	if (obj != null) {
		repairOrderEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		repairOrderEntity.msg = msg;
	}
	return repairOrderEntity;
}

Map<String, dynamic> $RepairOrderEntityToJson(RepairOrderEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] =  entity.obj.map((v) => v.toJson()).toList();
	data['msg'] = entity.msg;
	return data;
}

RepairOrderObj $RepairOrderObjFromJson(Map<String, dynamic> json) {
	final RepairOrderObj repairOrderObj = RepairOrderObj();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		repairOrderObj.id = id;
	}
	final String? cTime = jsonConvert.convert<String>(json['cTime']);
	if (cTime != null) {
		repairOrderObj.cTime = cTime;
	}
	final String? address = jsonConvert.convert<String>(json['address']);
	if (address != null) {
		repairOrderObj.address = address;
	}
	final String? fatalType = jsonConvert.convert<String>(json['fatalType']);
	if (fatalType != null) {
		repairOrderObj.fatalType = fatalType;
	}
	final int? urgency = jsonConvert.convert<int>(json['urgency']);
	if (urgency != null) {
		repairOrderObj.urgency = urgency;
	}
	final int? responseSpeed = jsonConvert.convert<int>(json['responseSpeed']);
	if (responseSpeed != null) {
		repairOrderObj.responseSpeed = responseSpeed;
	}
	final int? serviceAttitude = jsonConvert.convert<int>(json['serviceAttitude']);
	if (serviceAttitude != null) {
		repairOrderObj.serviceAttitude = serviceAttitude;
	}
	final int? constructionQuality = jsonConvert.convert<int>(json['constructionQuality']);
	if (constructionQuality != null) {
		repairOrderObj.constructionQuality = constructionQuality;
	}
	final String? state = jsonConvert.convert<String>(json['state']);
	if (state != null) {
		repairOrderObj.state = state;
	}
	return repairOrderObj;
}

Map<String, dynamic> $RepairOrderObjToJson(RepairOrderObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['cTime'] = entity.cTime;
	data['address'] = entity.address;
	data['fatalType'] = entity.fatalType;
	data['urgency'] = entity.urgency;
	data['responseSpeed'] = entity.responseSpeed;
	data['serviceAttitude'] = entity.serviceAttitude;
	data['constructionQuality'] = entity.constructionQuality;
	data['state'] = entity.state;
	return data;
}